Self-Adjusting Heaps

نویسندگان

  • Daniel Dominic Sleator
  • Robert E. Tarjan
چکیده

In this paper we explore two themes in data structure design: amortized computational complexity and self-adjustment. We are motivated by the following observations. In most applications of data structures, we wish to perform not just a single operation but a sequence of operations, possibly having correlated behavior. By averaging the running time per operation over a worst-case sequence of operations, we can sometimes obtain an overall time bound much smaller than the worst-case time per operation multiplied by the number of operations. We call this kind of averaging amortization. Standard kinds of data structures, such as the many varieties of balanced trees, are specifically designed so that the worst-case time per operation is small. Such efficiency is achieved by imposing an explicit structural constraint that must be maintained during updates, at a cost of both running time and storage space. However, if amortized running time is the complexity measure of interest, we can guarantee efficiency without maintaining a structural constraint. Instead, during each access or update operation we adjust the data structure in a simple, uniform way. We call such a data structure self-adjusting. In this paper we develop the skew heap, a self-adjusting form of heap related to the leftist heaps of Crane and Knuth. (What we mean by a heap has also been called a “priority queue” or a “mergeable heap”.) Skew heaps use less space than leftist heaps and similar worst-case-efficient data structures and are competitive in running time, both in theory and in practice, with worst-case structures. They are also easier to implement. We derive an information-theoretic lower bound showing that skew heaps have minimum possible amortized running time, to within a constant factor, on any sequence of certain heap operations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Pairing Heaps are Sub - optimalbyMichael

Pairing heaps were introduced as a self-adjusting alternative to Fibonacci heaps. They provably enjoy log n amortized costs for the standard heap operations. Although it has not been veri ed that pairing heaps perform the decrease key operation in constant amortized time, this has been conjectured and extensive experimental evidence supports this conjecture. Moreover, pairing heaps have been ob...

متن کامل

Pairing heaps with O(log log n) decrease cost

We give a variation of the pairing heaps for which the time bounds for all the operations match the lower bound proved by Fredman for a family of similar self-adjusting heaps. Namely, our heap structure requires O(1) for insert and findmin, O(log n) for delete-min, and O(log logn) for decreasekey and meld (all the bounds are in the amortized sense except for find-min).

متن کامل

Pairing Heaps with Costless Meld

Improving the structure and analysis in [1], we give a variation of the pairing heaps that has amortized zero cost per meld (compared to an O(log log n) in [1]) and the same amortized bounds for all other operations. More precisely, the new pairing heap requires: no cost per meld, O(1) per find-min and insert, O(log n) per delete-min, and O(log log n) per decrease-key. These bounds are the best...

متن کامل

Smooth heaps and a dual view of self-adjusting data structures

We present a new connection between self-adjusting binary search trees (BSTs) and heaps, two fundamental, extensively studied, and practically relevant families of data structures (Allen, Munro, 1978; Sleator, Tarjan, 1983; Fredman, Sedgewick, Sleator, Tarjan, 1986; Wilber, 1989; Fredman, 1999; Iacono, Özkan, 2014). Roughly speaking, we map an arbitrary heap algorithm within a broad and natural...

متن کامل

Why Some Heaps Support Constant-Amortized-Time Decrease-Key Operations, and Others Do Not

A lower bound is presented which shows that a class of heap algorithms in the pointer model with only heap pointers must spend Ω ( log log n log log log n ) amortized time on the Decrease-Key operation (given O(logn) amortized-time Extract-Min). Intuitively, this bound shows the key to having O(1)-time Decrease-Key is the ability to sort O(log n) items in O(log n) time; Fibonacci heaps [M. .L. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • SIAM J. Comput.

دوره 15  شماره 

صفحات  -

تاریخ انتشار 1986